package com.lonely.web.controller.order;

import com.lonely.common.core.domain.api.R;
import com.lonely.order.domain.vo.order.ReportWorkVO;
import com.lonely.order.service.IReportWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/11/18 16:39
 * @description: 报工请求处理器
 */
@RestController
@RequestMapping("/orderManager/reportWork")
public class ReportWorkController {



    @Autowired
    private IReportWorkService reportWorkService;

    /**
     * 获取某个订单的报工记录
     *
     * @param produceOrderId
     * @return
     */
    @GetMapping("/getReportWorkByProduceOrderId/{produceOrderId}")
    public R<List<ReportWorkVO>> getReportWorkByProduceOrderId(@PathVariable("produceOrderId") String produceOrderId) {

        return R.data(this.reportWorkService.getReportWorkByProduceOrderId(produceOrderId));
    }

}
